package cn.cdeden.knowledge.dubbo;

import cn.cdeden.common.core.utils.MapstructUtils;
import cn.cdeden.common.satoken.utils.LoginHelper;
import cn.cdeden.knowledge.api.domain.RemoteSysDocLogService;
import cn.cdeden.knowledge.api.domain.RemoteTeamFileTreeService;
import cn.cdeden.knowledge.api.domain.vo.RemoteTeamFilesTreeVo;
import cn.cdeden.knowledge.domain.TeamFilesTree;
import cn.cdeden.knowledge.enums.OperationEnum;
import cn.cdeden.knowledge.enums.TreeEnum;
import cn.cdeden.knowledge.service.SysDocLogService;
import cn.cdeden.knowledge.service.TeamFilesTreeService;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.List;

@RequiredArgsConstructor
@Service
@DubboService
public class RemoteSysDocLogServiceImpl implements RemoteSysDocLogService {

    private final SysDocLogService sysDocLogService;

    @Override
    public void createLog(String documentId, String operationType, String documentName, String documentPath, String documentStatus) {
        sysDocLogService.createLog(documentId, LoginHelper.getLoginUser(), TreeEnum.TEAM,OperationEnum.RECOVER.judgmentType(operationType),documentName,documentPath,documentStatus);
    }
}
